<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    html,body{
      margin: 0;
      height: 100%;
    }
    .father {
      /* 想让第一个盒子继承100%高度,它的父级必须写明100%高度
      最高级是html 然后是body 他们都需要声明,然后页面元素才可以继承 */
      height: 100%;
      margin: 0;
      background-color: gray;
      position: relative;
    }
    .leftson {
      position: absolute;
      width: 180px;
      top: 0;
      left: 0;
      bottom: 0;
      background-color: brown;
    }
    .rightson{
      height: 100%;
      margin-left: 200px;
      right: 0;
      background-color: orange;
    }
  </style>
</head>

<body>
  <div class="father">
    <div class="leftson"></div>
    <div class="rightson"></div>
  </div>
</body>

</html>